import request from '@/utils/request';

// 查询业务服务资源端到端关系
export function getStepId(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/step/endToEndRelationship/getEndToEndRelationship',
		method: 'post',
		data: data,
		headers: {
			version: 'dengfazhu',
		},
	});
}

// 更新坐标
export function updateLocation(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/step/endToEndRelationship/updateNodeLocation',
		method: 'post',
		data: data,
		headers: {
			version: 'dengfazhu',
		},
	});
}

// 新增业务服务资源端到端关系
export function add(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/step/endToEndRelationship/addNode',
		method: 'post',
		data: data,
		headers: {
			version: 'dengfazhu',
		},
	});
}

// 删除业务服务资源端到端关系
export function remove(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/step/endToEndRelationship/removeNode',
		method: 'delete',
		data: data,
		headers: {
			version: 'dengfazhu',
		},
	});
}

// 查询是否被其他业务步骤公用
export function selectBusinessState(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/admin/modules/business/stepIt/selectBusinessState',
		method: 'post',
		data: data,
	});
}
